package fhp.hlhj.giantfold.module

import com.lzy.okgo.model.HttpParams
import fhp.hlhj.giantfold.javaBean.BaseBean
import fhp.hlhj.giantfold.network.UrlApis

/**
 * author: FHP
 * data: on 2018\1\30 0030 17:02
 * E-Mail: 103945089@qq.com
 */
class ReportModule {
    interface onReportListener{
        fun showLoading()
        fun onResp(baseBean: BaseBean)
    }

    fun report(params: HttpParams,listener: onReportListener){
        UrlApis.report(params)
                .doOnSubscribe {
                    listener.showLoading()
                }
                .subscribe { data->
                    listener.onResp(data)
                }
    }


}